2020-2021 Sunseeker Telemetry and Lighting System
usci_b_i2c_ex1_masterRxSingle.c File Reference
#include "driverlib.h"

Go to the source code of this file.

Macros

#define SLAVE_ADDRESS   0x48
 

Functions

void main (void)
 
void USCI_B0_ISR (void)
 

Variables

uint8_t receivedData
 

Macro Definition Documentation

◆ SLAVE_ADDRESS

#define SLAVE_ADDRESS   0x48

This example shows how to configure the I2C module as a master for single byte reception in interrupt driven mode. The address of the slave module that the master is communicating with also set in this example.

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

  • I2C peripheral
  • GPIO Port peripheral (for I2C pins)
  • SCL2
  • SDA

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

  • USCI_B0_VECTOR.

Definition at line 64 of file usci_b_i2c_ex1_masterRxSingle.c.

Function Documentation

◆ main()

void main ( void  )

Definition at line 68 of file usci_b_i2c_ex1_masterRxSingle.c.

References __no_operation(), param, and SLAVE_ADDRESS.

◆ USCI_B0_ISR()

void USCI_B0_ISR ( void  )

Definition at line 130 of file usci_b_i2c_ex1_masterRxSingle.c.

References __bic_SR_register_on_exit(), and receivedData.

Variable Documentation

◆ receivedData

uint8_t receivedData

Definition at line 66 of file usci_b_i2c_ex1_masterRxSingle.c.

Referenced by USCI_B0_ISR().